package cn.itcast.dagger_demo;

import dagger.Module;
import dagger.Provides;

/**
 * Created by Administrator on 2016/8/3.
 */

@Module
public class ActivityModule {

    private MainActivity mainActivity;

    public ActivityModule(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
    }

    @Provides
    public MainActivity provideMainActivity() {

        return mainActivity;
    }

    /*@Provides
    public Data provideData() {

        return new Data("ActivityModule Data");
    }*/

    @Provides
    public  DaggerPresenter provideDaggerPresenter(MainActivity activity) {

        return new DaggerPresenter(activity);
    }

}
